import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './common/config/routerConfig' // 全局配置
import Vant from 'vant'
import 'vant/lib/index.css'
import Router from 'vue-router'
import constant from '@/common/constant/httpStatus'
import moment from 'moment' // 引入格式化时间
import utils from '@/common/util/utils'
import Bridge from '@/common/util/bridge'
import { toast } from 'vant'

// if (process.env.NODE_ENV !== 'production') require('@/mock')
Vue.use(Vant)
Vue.prototype.$constant = constant
Vue.prototype.$utils = utils
Vue.prototype.$moment = moment
Vue.config.productionTip = false
Vue.prototype.$bridge = Bridge
Vue.prototype.$toast=toast
const routerPush = Router.prototype.push
Router.prototype.push = function push (location) {
  return routerPush.call(this, location).catch(error => error)
}
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
